<?php
/**
 * Created by PhpStorm.
 * Author: Sojo
 * Date: 2017/2/16
 * Time: 19:33
 */
namespace App\Api\Service\Routes;

use Dingo\Api\Routing\Router;

class StockRoute
{
    public function map(Router $router)
    {
        $router->group(['namespace' => 'Stock\Controllers', 'prefix' => 'stock'], function ($router) {
            //流水列表
            $router->any('list', 'StockController@getStockList');
            //获取材料出入库流水
            $router->any('get-water-list', 'StockController@getWaterList');
            //获得指定商品的出入库流水
            $router->any('get-product-water-list', 'StockController@getProductWaterList');
            //获得材料的基础信息
            $router->any('get-product-base-info', 'StockController@getProductInfo');
            //获得指定商品的采购流水
            $router->any('get-product-purchase-water-list', 'StockController@getProductPurchaseWaterList');
            //获得材料打码记录
            $router->any('get-product-qr-code-log', 'StockController@getProductQrCodeLog');


            //流水列表 包含 产品信息
            $router->any('list-info', 'StockController@getWaterWithInfo');
            $router->any('in', 'StockController@stockIn');
            //库存详情，ape接口
            $router->any('info', 'StockController@productStockInfo');
            $router->any('delete', 'StockController@delStock');
            //采购入库详情
            $router->any('purchase-info', 'StockController@purchaseInfo');
            $router->any('print', 'StockController@printer');
            $router->any('qrcode', 'StockController@qrcode');
            $router->any('customer-in', 'CustomerController@stockin');
            //审批流程创建材料
            $setFunction = 'purchaseMaterialAdd';
            $router->any($setFunction,'StockController@'.$setFunction);
            //流水详情
            $router->any('water-detail', 'WaterController@detail');
            $router->any('water-add', 'WaterController@add');

            //采购员填写材料价格
            $router->any('purchasePriceSubmit', 'StockController@purchasePriceSubmit');


        });
    }
}